package xcode

import "io"

type Unmarshaler interface{
  // Unmarshal decode from bytes
  Unmarshal(data []byte, ptr any) error
}

type Marshaler interface{
  // Marshal encode value to bytes
  Marshal(value any) ([]byte, error)
}


type Encoder interface{
  // Encode value to bytes and write to a dist(io.Writer).
  Encode(w io.Writer, value any) error
}

type Decoder interface{
  // Decode from source.
  Decode(r io.Reader, prt any) error
}
